/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vullnetdyla;

import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author neti
 */
public class Threading implements Runnable{
    
    String name;
    int time;
    
    public Threading(String n, int t){
        name = n;
        time = t;
    }
    
    public void run(){
        
        try {
            System.out.println(name + " is loing to sleep for: " + time + "\n");
            Thread.sleep(time);
            System.out.println(name + " is awake");
        } catch (InterruptedException ex) {
            Logger.getLogger(Threading.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}
